package com.gowants.pems.mapper;

import com.gowants.pems.model.EquipmentMaintain;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface EquipmentMaintainMapper {

    /**
     * 检索
     * @param record
     * @return
     */
    public List<EquipmentMaintain> select(@Param("record") EquipmentMaintain record);
    
    
    public EquipmentMaintain selectOne(@Param("id") String id);

    /**
     * 插入保养计划
     * @param record
     * @return
     */
    public int insert(@Param("record") EquipmentMaintain record);

    /**
     * 变更保养计划
     * @param record
     * @return
     */
    public int update(@Param("record") EquipmentMaintain record);

    /**
     * 获取最后保修时间
     * @param equipmentId
     * @return
     */
    public Date selectMaxEndTime(String equipmentId);

    /**
     * 删除未保修记录
     * @param equipmentId
     * @return
     */
    public int deleteUnMaintain(String equipmentId);
    
    
    public  List<EquipmentMaintain> selectByEid(String equipmentId);
    

}
